import os

SECRET_KEY = 'djwaklofwjalwkfwakda132fwaf413'
SQLALCHEMY_DATABASE_URI = f"mysql+pymysql://root:@127.0.0.1:3306/bbs"

# 连接qq邮箱
MAIL_SERVER = 'smtp.qq.com'
MAIL_PORT = 465
MAIL_USE_TLS = False
MAIL_USE_SSL = True
MAIL_USERNAME = ''
MAIL_PASSWORD = ''
MAIL_DEFAULT_SENDER = ""

# 文件上传
UPLOAD_FOLDER = 'static/uploads'  # 设置保存上传文件的文件夹路径
if not os.path.exists(UPLOAD_FOLDER):
    os.makedirs(UPLOAD_FOLDER)

# 头像
# 文件上传
PHOTO_FOLDER = 'static/photo'  # 设置保存上传文件的文件夹路径
if not os.path.exists(PHOTO_FOLDER):
    os.makedirs(PHOTO_FOLDER)

# 文章内容
PHOTO_ARTICL = 'static/article_img'  # 设置保存上传文件的文件夹路径
if not os.path.exists(PHOTO_ARTICL):
    os.makedirs(PHOTO_ARTICL)

UPLOAD_FOLDER = UPLOAD_FOLDER

UPLOAD_ARTICLE = PHOTO_ARTICL
